﻿@model System.Data.DataSet
@using App.Core.DB;
@{
    String _CompanyKey = ViewData[AppConstants.ViewDataKeys.COMPANY_KEY] as String;
}
@if (Model != null && Model.Tables.Count > 0)
{
    foreach (System.Data.DataRow row in Model.Tables[0].Rows)
    {        
        int productID = NullHandler.GetInt(row["ID"]);
        String productUrl = Html.ProductDetailsUrl(_CompanyKey, productID, NullHandler.GetString(row["ProductUrl"]));
        String productName =  NullHandler.GetString(row["Name"]);
        <div class="sidebar-product-box">            
            <a href="@productUrl">@productName</a>            
            <div class="sidebar-product-thumb">
                <a href="@productUrl">
                @Html.ProductThumb(NullHandler.GetString(row["ThumbImage"]), productID, productName)
                </a>
            </div>
            <div class="price-block">                
                <div class="price-amount">@WebUtil.FormatData(row["Price"]) <span>@ConfigReader.CurrencyCode</span></div>                
            </div>
            <div class="clear"></div>
        </div>        
    }
}
